// 刚定义时，状态默认为 pending
const p1 = new Promise((resolve, reject) => {

})
console.log('p1', p1) // pending

// 执行 resolve() 后，状态变成 resolved
const p2 = new Promise((resolve, reject) => {
    setTimeout(() => {
        resolve()
    })
})

console.log('p2', p2) // pending 一开始打印时

// 执行 reject() 后，状态变成 rejected
const p3 = new Promise((resolve, reject) => {
    setTimeout(() => {
        reject()
    })
})
console.log('p3', p3) // rejected

setTimeout(() => console.log('p3-setTimeout', p3)) // rejected

